package com.woniuxy.util;



import java.lang.reflect.Method;

/**
 * @Author: 曾令忠
 * @Description:
 * @Date: 2020/7/2 0002-下午 5:03
 */
public class RedisUtil {
    public static String generate(String namespace,Object target, Method method, Object... params) {
        StringBuilder sBuilder = new StringBuilder();
        sBuilder.append(namespace);
        sBuilder.append("::");
        sBuilder.append(target.getClass().getName());
        sBuilder.append(".");
        sBuilder.append(method.getName());    //生成key
        for(Object object:params){
            sBuilder.append(".");
            sBuilder.append(object.toString());
        }
        return sBuilder.toString();
    }
}
